{extend name="base/main" /}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox float-e-margins">
        <div class="ibox-title">
            <h5>音频专题 / 素材列表</h5>
        </div>
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="search-area" id="toggle" style="margin-bottom: 15px;">
                        <form class="form-horizontal m-t" action="{:url('Marketing/activity')}" method="get">
                            <div class="layui-form">
                                <div class="layui-inline">
                                    <label class="layui-form-label">搜索</label>
                                    <div class="layui-input-inline">
                                        <input type="tel" name="phone" lay-verify="required|phone" autocomplete="off" class="layui-input" placeholder="请输入要查询的数据">
                                    </div>
                                    <button type="button" class="layui-btn layui-btn-normal">原始按钮</button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="layui-form">
                        <div class="layui-inline">
                            <a href="{:url('Marketing/activity_add')}" class="layui-btn layui-btn-normal">添加活动</a>
                        </div>
                        <table class="layui-table">
                            <colgroup>
                                <col width="150">
                                <col width="150">
                                <col width="200">
                                <col>
                            </colgroup>
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>活动名称</th>
                                <th>图片</th>
                                <th>地址</th>
                                <th>活动人数</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="data" id="vo"}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.a_name}</td>
                                <td><img src="{$vo.img}" alt="" width="150px" height="80px"></td>
                                <td>{$vo.site}</td>
                                <td>{$vo.a_number}</td>
                                <td>{$vo.state}</td>
                                <td>
                                    <div class="dropdown" style="display: inline-block;">
                                        <button data-toggle="dropdown" class="btn btn-success btn-xs dropdown-toggle">
                                            <i class="fa fa-chevron-down"></i> 更多
                                        </button>
                                        <ul class="dropdown-menu m-t-xs">
<!--                                            <li><a href="{:url('Marketing/apply')}"><i class="fa fa-bars"></i>报名人员</a></li>-->
                                            <li><a href="{:url('Marketing/activity_edit',['id'=>$vo['id']])}"><i class="fa fa-bars"></i>编辑</a></li>
                                            <li><a href="{:url('Marketing/activity_delete',['id'=>$vo['id']])}" onclick="return confirm('确定要删除这条数据吗？');"><i class="fa fa-bars"></i>删除</a></li>
                                        </ul>
                                    </div>
                                </td>
                            </td>
                            </tr>
                            {/volist}
                            </tbody>
                        </table>
                    </div>

                    </div>
                </div>
            </div>
            {$list->render()}
        </div>

    </div>
</div>

<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;

        //监听提交
        form.on('submit(formDemo)', function(data){
            // layer.msg(JSON.stringify(data.field));
            // return false;
        });
    });
</script>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //日期范围
        laydate.render({
            elem: '#test6'
            //设置开始日期、日期日期的 input 选择器
            //数组格式为 2.6.6 开始新增，之前版本直接配置 true 或任意分割字符即可
            ,range: ['#test-startDate-1', '#test-endDate-1']
        });
    });
</script>
{/block}